<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;


class Back extends Controller
{
  //获取背景时间

  public function getBack(){
    //获取现在的时间
    $time = date('H.i');
    $img = DB::table('background')->where('start_time','<',$time)->where('end_time','>',$time)->first();
    return ['code'=>200,'message'=>'获取成功','data'=>$img];
  }

}
